home *** CD-ROM | disk | FTP | other *** search
- Path: news.iconn.net!news
- From: thecrow@iconn.net (The Crow)
- Newsgroups: comp.lang.c++
- Subject: trouble with command line args, need help
- Date: 18 Feb 1996 21:20:56 GMT
- Organization: I rule the world
- Message-ID: <4g857p$omf@news.iconn.net>
- NNTP-Posting-Host: st-ts00-02.iconn.net
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- Hey, I have a program that has three strings defined as such
-
- char key[80];
- char ifn[12];
- char ed[1];
-
- Then I read in the command line arguments in the main function like so:
-
- main(int argc, char* argv[]) {
- blablabla
- }
-
- then inside the main function I try to do this
-
- ifn = argv[1];
- ed = argv[2];
- key = argv[3];
-
-
- I get an error about Lvalues in function main. I have tried adding little
- stars all over the place and different combinations but I either get the Lvalue
- error or something about near pointers. I just want to dump the command line
- arguments in the strings. How do I do?
-
- --
- The Crow - thecrow@iconn.net
- "It can't rain all the time"
-
-
-